<template>
	<view>
		<text>demo2图片轮播页面</text>
		<view class="">
			
			<!-- <image src="../../static/likeFx/1.png" alt="" /> -->
			<!-- :src是v-bind:src的简写 -->
			<image :src="picDynaicUrl" alt="" />
		</view>
	</view>
</template>

<script setup>
import { ref } from 'vue'
const imgArr=ref([
	'../../static/likeFx/1.png',
	'../../static/likeFx/2.png',
	'../../static/likeFx/3.png',
	'../../static/likeFx/4.png',
])

const picDynaicUrl = ref("../../static/likeFx/1.png")
let i=0
setInterval(() => {
	i++
	console.log(i)
	picDynaicUrl.value=imgArr.value[i%4]
	console.log(picDynaicUrl.value[i%4])
	// i 就在0-3 ，四张图片之间切换
	}, 1000)
	
</script>

<style>

</style>
